package com.demo.designmode.decorator;

/**
 * @Author: jxm
 * @Description: 培根配料
 * @Date: 2023-12-13 14:13
 * @Version: 1.0
 */
public class Bacon extends Garnish{

    public Bacon(FastFood fastFood) {
        super(2, "培根", fastFood);
    }

    @Override
    public float cost() {
        return getPrice() + getFastFood().getPrice();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
